#import "ee/graphql_shared/fragments/epic.fragment.graphql"
#import "~/graphql_shared/fragments/label.fragment.graphql"

query epicBoardListEpics(
  $fullPath: ID!
  $boardId: BoardsEpicBoardID!
  $id: BoardsEpicListID
  $filters: EpicFilters
  $after: String
  $first: Int
) {
  group(fullPath: $fullPath) {
    id
    board: epicBoard(id: $boardId) {
      id
      lists(id: $id) {
        nodes {
          id
          listType
          epics(first: $first, after: $after, filters: $filters) {
            nodes {
              ...EpicNode
              relativePosition
              referencePath: reference(full: true)
              confidential
              subscribed
              blocked
              blockedByCount
              labels {
                nodes {
                  ...Label
                }
              }
              hasIssues
              descendantCounts {
                closedEpics
                closedIssues
                openedEpics
                openedIssues
              }
              descendantWeightSum {
                closedIssues
                openedIssues
              }
            }
            pageInfo {
              endCursor
              hasNextPage
            }
          }
        }
      }
    }
  }
}
